public class leiMing {
    private int age;
    //set(赋值)
    public void setAge(int a){
        if(a<0||a>120){
            System.out.println("你给的年龄有误");
            return;
        }
        age = a;
    }
    //get(取值)
    public int getAge(){
        return age;
    }
}
